<%@ include file="/WEB-INF/jsp/includes/header.jsp"%>
<table width="592">
	<tr>
		<td class="title"><s:property value="title"/></td>
	</tr>
	<tr><td>&nbsp;</td></tr>		
	<s:if test="pacient != null">
		<s:form id="historialForm" action="showHistorial" method="post" validate="true">
			<s:push value="pacient">
				<!-- Inici dades comuns dels usuaris -->
				<tr id="row_<s:property  value="id"/>">
					<s:hidden name="id" value="%{id}"/>
					<td><s:label key="nom"/></td>
				</tr>
				<tr>
					<td><s:label key="primerCognom"/></td>
				</tr>
				<tr>
					<td><s:label key="segonCognom"/></td>
				</tr>
				<!-- Fi dades comuns dels usuaris -->
			</s:push>
			<tr><td>&nbsp;</td></tr>
			<!-- Inici dades de l'historial -->
			<s:if test="visitesProtegides != null">
				<tr>
					<td class="subtable"><s:text name="visites"/></td>
				</tr>
				<tr>
					<table cellspacing="5" class="registryTable">
						<tr>
							<!-- <td>&nbsp;</td> -->
							<td class="headerSubtable"><s:text name="anamnesi"/></td>
							<td class="headerSubtable"><s:text name="dataHora"/></td>
							<td class="headerSubtable"><s:text name="diagnosi"/></td>
							<td class="headerSubtable"><s:text name="tractament"/></td>
						</tr>
						<s:iterator value="visitesProtegides" >
							<tr id="row_visita_<s:property value="id"/>">
								<!-- 
								<td><a href='<s:url action="showVisita"><s:param name="id" value="%{id}"/>
									</s:url>'><s:text name="visita.go"/></a>
								</td>
								 -->
								<td><a href='<s:url action="showVisita"><s:param name="id" value="%{id}"/>
									</s:url>'><s:property value="anamnesi"/></a>
								</td>
								<td><s:date name="dataHora" format="dd/MM/yyyy HH:mm" /></td>
								<td><s:property value="diagnosi"/></td>
								<td><s:property value="tractament"/></td>								
							</tr>
						</s:iterator>
					</table>
				</tr>
			</s:if>
		</s:form>
	</s:if>
</table>

<table class="actions" width="592">
	<tr><td>&nbsp;</td></tr>
	<tr><td><s:text name="actions"/></td></tr>
	<tr>
		<td><a href='<s:url action="showPacient"/>'><s:text name="pacient.go"/></a></td>
		<td><a href="<s:url action="logout" includeParams="none"/>"><s:text name="logout"/></a></td>
	</tr>
</table>

<%@ include file="/WEB-INF/jsp/includes/footer.jsp"%>
